home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / seclau / passform.frm < prev    next >
Text File  |  1995-05-08  |  2KB  |  74 lines

  1. VERSION 2.00
  2. Begin Form PassForm 
  3.    Caption         =   "Password"
  4.    ClientHeight    =   540
  5.    ClientLeft      =   2475
  6.    ClientTop       =   3495
  7.    ClientWidth     =   4230
  8.    ControlBox      =   0   'False
  9.    Height          =   945
  10.    Left            =   2415
  11.    LinkTopic       =   "Form2"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   540
  15.    ScaleWidth      =   4230
  16.    Top             =   3150
  17.    Visible         =   0   'False
  18.    Width           =   4350
  19.    Begin Label Label1 
  20.       BorderStyle     =   1  'Fixed Single
  21.       Height          =   255
  22.       Left            =   240
  23.       TabIndex        =   0
  24.       Top             =   120
  25.       Width           =   3855
  26.    End
  27. End
  28. Dim PassFormPassWord As String
  29.  
  30. Sub Form_GotFocus ()
  31.     PassFormPassWord = ""
  32.     PassForm.Label1.Caption = ""
  33. End Sub
  34.  
  35. Sub Form_KeyPress (KeyAscii As Integer)
  36.     If KeyAscii = 13 Then
  37.         PassForm.Visible = False
  38.         If PassForm.Caption = "Master Password" Then
  39.             If PassFormPassWord = MasterPassword Then
  40.                 Call SetupMaint
  41.                 MantForm.Visible = True
  42.                 End If
  43.             Else
  44.             If PassFormPassWord = ProgramPassword Then
  45.                 X = Shell(ProgramName, 1)
  46.                 End
  47.                 Else
  48.                 MsgBox "Wrong Password", 0, "Sorry"
  49.                 Launch_Form.Visible = True
  50.                 End If
  51.             End If
  52.         End If
  53.     If KeyAscii = 8 Then
  54.         If Len(PassFormPassWord) > 0 Then PassFormPassWord = Left$(PassFormPassWord, Len(PassFormPassWord) - 1)
  55.         Else
  56.         PassFormPassWord = PassFormPassWord + Chr$(KeyAscii)
  57.         End If
  58.     PassForm.Label1.Caption = String$(Len(PassFormPassWord), "*")
  59. End Sub
  60.  
  61. Sub MaskedEdit1_KeyPress (KeyAscii As Integer)
  62.     If KeyAscii = 13 Then
  63.         PassForm.Visible = False
  64.         Launch_Form.Visible = True
  65.         End If
  66. End Sub
  67.  
  68. Sub Text1_KeyPress (KeyAscii As Integer)
  69.     If KeyAscii = 13 Then
  70.         PassForm.Visible = False
  71.         End If
  72. End Sub
  73.  
  74.